--
-- VHDL Architecture awsome_audio_lib.mono.arch
--
-- Created:
--          by - erial674.student (southfork-12.edu.isy.liu.se)
--          at - 20:16:04 10/14/11
--
-- using Mentor Graphics HDL Designer(TM) 2008.1 (Build 17)
--
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_signed.all;
use IEEE.numeric_std.all;
ENTITY mono IS
   PORT( 
      AD_left_out  : IN     std_logic_vector (23 DOWNTO 0);
      AD_right_out : IN     std_logic_vector (23 DOWNTO 0);
      DA_right_in  : OUT    std_logic_vector (23 DOWNTO 0)
   );

-- Declarations

END mono ;

--
ARCHITECTURE arch OF mono IS

BEGIN
  process
  begin
    if to_integer(signed(AD_left_out))*to_integer(signed(AD_left_out)) < to_integer(signed(AD_right_out))*to_integer(signed(AD_right_out)) then
      DA_right_in <= AD_right_out;
    else
      DA_right_in <= AD_left_out;
    end if;
  end process;
END ARCHITECTURE arch;

